package com.ag.zhh.service;

import java.util.List;

import com.ag.zhh.dao.DeptDAO;
import com.ag.zhh.vo.Dept;
import com.ag.zhh.vo.UserDept;

/**
 * 
 * @author 张颢铧
 *
 */
public class OADeptService {
	private DeptDAO deptDAO;
	public void updateDept(UserDept dept)
	{
		deptDAO.saveOrUpdateDept(dept);
	}
	public void setDeptDIfOnly(List<String> DIds) throws Exception {
		deptDAO.setDeptDIfOnly(DIds);
	}

	public void resetDeptDIfOnly(List<String> DIds) throws Exception {
		deptDAO.resetDeptDIfOnly(DIds);
	}

	
	public void deleteDept(Dept dept) {
		deptDAO.deleteDept(dept);
		//reloadTree;
	}
	public void deleteDept(String deptId) {
		deptDAO.deleteDept(deptId);
		//reloadTree;
	}
	
	public void setDeptforInformIncident(List<String> DIds) {
		
	}
	//查询事件通知部门
	public List<Dept> findDept() throws Exception
	{
		return deptDAO.findByDIf(1);
	}
	public DeptDAO getDeptDAO() {
		return deptDAO;
	}

	public void setDeptDAO(DeptDAO deptDAO) {
		this.deptDAO = deptDAO;
	}
	
}

